﻿using CToolsWin.DAL.sys;
using Model.sys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CToolsWin.BLL.sys
{
    public class BLLFileInfo
    {
        private DALFileInfo dal = new DALFileInfo();
        /// <summary>
        /// 初始化表
        /// </summary>
        public bool InitTable()
        {
            return dal.InitTable();
        }
        public long Add(sys_FileInfo m)
        {
            try
            {
                bool bol = dal.IsExists(m);
                if (bol == false)
                    return dal.Add(m);
                else
                    return 0;
            }
            catch (Exception ex)
            {
                Common.Msg.Log.GetLog.Error("保存文件信息异常", ex);
                return 0;
            }
        }
    }
}
